
import QtQuick 2.1
import QtQuick.Controls 1.0
import QtQuick.Window 2.0
import QtQuick.Dialogs 1.0
import QtQuick.XmlListModel 2.0
import QtQuick.Controls.Styles 1.0

Rectangle {
    id: rectanglePaneSkillSynergy
    color: "steelblue"
    clip: true

    Item {
        anchors.fill: parent
        anchors.margins: 6

        Text {
            id: textEditTitle
            text: "Class Skills"
            color: "white"
            anchors.top: parent.top
            anchors.left: parent.left
            anchors.right: parent.right
            font.pixelSize: 16
            font.bold: true
        }

        ScrollView {
            id: scrollViewClassSkills
            anchors.top: textEditTitle.bottom
            anchors.left: parent.left
            anchors.right: parent.right
            anchors.bottom: parent.bottom
            anchors.topMargin: 8

            ListView {
                model: modelSkills
                spacing: 2


                delegate: ComponentCheckBox {
                    id: checkBoxClassSkill
                    anchors.left: parent.left
                    anchors.right: parent.right
                    height: 12

                    property string pattern: skillName.replace("(", "\\(").replace(")", "\\)")
                    property bool found: { modelCharacterClasses.get(editIndex).classSkills.search(pattern) >= 0 }

                    checkedState: found ? Qt.Checked : Qt.Unchecked
                    text: skillName

                }

            }

        }
    }


}

